package x.y.z;

import java.util.ArrayList;
import java.util.List;

public class LeetCode_0590 {
    private List<Integer> result = new ArrayList<>();

    public List<Integer> postorder(Node root) {
        if (root != null) {
            for (Node node : root.children) {
                postorder(node);
            }
            result.add(root.val);
        }
        return result;
    }
}
